Repository navigation
lib/traceql: convert durations for the duration field only - #322
Merged
jiekun merged 2 commits intoNov 30, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="lib/traceql/parser.go">
<violation number="1" location="lib/traceql/parser.go:456">
P2: `isQuoted` is not honored by the special `traceDuration` serialization path, so quoted duration-like values still become nanoseconds. Gate the conversion in `Query.String` on `!tf.isQuoted` and add a regression test for `{traceDuration = "30s"}`.</violation>
</file>
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
Re-trigger cubic
jiekun
reviewed
Nov 27, 2026
`{ span.cache.ttl = "30s" }` was translated to `"span_attr:cache.ttl":=30000000000`,
so it never matched a span whose `cache.ttl` attribute is the string `30s`.
Values such as `100ms` are converted to nanoseconds only for the `duration` field now.
Fixes VictoriaMetrics#321
ZeXi0308
force-pushed
the
fix/traceql-quoted-duration
branch
from
November 27, 2026 18:29
d75382f to
1ce53ae
Compare
…ple string instead of const
jiekun
approved these changes
Nov 30, 2026
jiekun
left a comment
Member
There was a problem hiding this comment.
Thank you for the contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #321
{ span.cache.ttl = "30s" }was translated to"span_attr:cache.ttl":=30000000000, so it never matched a span whosecache.ttlattribute is the string30s.Values such as
100msare converted to nanoseconds only indurationandtraceDurationfilters now.